<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- <link rel="stylesheet" href="/res/front/css/sytle/jquery-ui-css/jquery-ui.css" />
<script type="text/javascript" src="/res/front/js/js/jquery-1.5.1.js"></script>
<script type="text/javascript" src="/res/front/js/js/jquery-ui-1.8.11.js"></script>
<link type="text/css" rel="stylesheet" href="/res/front/css/sytle/user-css/user_message.css" /> -->
<link type="text/css" rel="stylesheet" href="../../../res/front/css/sytle/index.css" />
<link type="text/css" rel="stylesheet" href="../../../res/front/css/sytle/user-css/user_message.css" />
<script type="text/javascript" src="/res/front/js/js/jquery-ui-js/jquery-1.8.3.js"></script>
<script type="text/javascript" src="../../../res/front/js/js/popup_layer.js"></script>
<link rel="shortcut icon" type="image/x-icon" href="${base}/res/front/img/imagesForFront/favicon.ico" />
<script type="text/javascript">
	<#if error??>
		alert('${error}');
	</#if>
	
	$(document).ready(function() {
		new PopupLayer({trigger:"#ele1",popupBlk:"#blk1",closeBtn:"#close1"});
		$('.Pclos').css({"position":"absolute"}); 
		$('#Pclose').click(function(){
			$('.current').css('display','none');
			$(".bot").css({"display":"none"});
		});
		
		$('.Pclos').click(function(){
			$('.current').css('display','none');
			$(".bot").css({"display":"none"});
		});
		
		$(".current").css({"display":"none","height":$(document).height()});
		$(".bot").css({"display":"none","height":$(document).height()});
	});
	
	
	function showImage(ele) {		
   		var wid = $(window).width() /2- $('.current img').width()/2;
		var hei = ( $('.zhong').height()); 
		var sTop = ($(window).scrollTop());
		$('.Pclos').css({"left":$(window).width() /2+$('.current img').width()/2-100,"top":$(window).scrollTop()+65 })
		$(".bot").show();
		$('.current').show();
		$('.current img').attr( {src: $(ele).attr('src'), alt: $(ele).attr('alt') } ).css({'left':wid,'top':sTop + 110 });	
	}
</script>

<title>资料上传 - ${title}</title>
</head>

<body>
	<!-- 头部 header.html -->
	<#include "/front/common/header.html"/>
    <!-- 中部 -->
    <div class="memeber_middle">
        <#if errors??>
            <#list errors as error>
                ${error}
            </#list>
        </#if>
    	<div class="member_location_div">
            <span>
                <b><a href="/index.jspx">首页</a></b>&nbsp;>
                <b>账户管理</b>&nbsp;>
                <b>资料上传</b>
            </span>
        </div>
    	<div class="memeber_centre">
            <!-- 左边目录 -->
            <div class="memeber_left_nav_div">
            	<#include "会员中心页_导航.html"/>
            </div>
            <!-- 右边目录明细 -->
            <div class="member_uploadright_detail_div">
            	<div class="menber_upload_div zhong">
                	<div class="upload_title_header">
                    	<b>资料上传</b>
                    </div>
                    <div class="upload_install_list">
                    	<!-- 已上传资料div -->
                        <#list tiList! as t>
                            <div class="upload_already_div">
                                <div class="upload_already_radius">
                                    <ul>
                                        <li>
                                            <img class="shows" src="${t.path!}" alt="img" width="218" height="85" border="0" title="${t.content!}" onclick="showImage(this);" />
                                        </li>
                                        <li class="upload_photoName">${t.content!?string}</li>
                                        <li class="upload_photoAudit">
                                        <#list statusMap?keys as idKey>
											<#if idKey==t.status!?string> 
												${statusMap[idKey]}
											</#if>
										</#list> 
                                    </ul>
                                </div>
                            </div>
                        </#list>
                    	<!-- 新上传资料div -->
                    	<div id="ele1" class="upload_new_div">
                        	<div class="upload_new_addImg">
                            	<img src="../../../res/front/img/imagesForFront/jia.gif" border="0" width="40" height="40" style="margin-top:25px;" />
                            </div>
                            <div class="upload_new_datum">上传资料</div>
                        </div>
                        <!-- 上传资料div -->
                        <div id="blk1" class="blk upload_newBrowse_div">
                            <div class="upload_newBrowse_main">
                                <!--<div style="width:90px; height:90px; float:left;">
                                    <#if tmember.headurl??>
                                        <img src="${tmember.headurl}" id="preImg0" onerror="this.src='/res/front/img/imagesForFront/portrait.jpg'" border="0" width="90" height="90" />
                                    <#else>
                                        <img src="/res/front/img/imagesForFront/portrait.jpg" id="preImg0" border="0" width="120" height="150" />
                                    </#if>
                                </div>-->
                                <div>
                                    <input type="file" id="uploadFile0" tabindex="3" size="8" name="pic" class="" accept="image/*" />
                                    <input type="text" id="uploadImgPath0"  name="m_b_pic" value="" size="8" style="display: none;"/> 
                                    <input type="hidden" id="mark0" value="false"/>
                                    <br />
                                    <span class="upload_imgSize">图片大小不超过1M</span>
                                   <br/>
                                </div>
                                <input type="button" value="上传" onclick="upload(0);" class="upload_confirm" />
                                <input type="button" value="关闭" id="close1" class="upload_close" />
                            </div>
                            <div class="foot">
                                <div class="foot-right"></div>
                            </div>
                        </div>
                        <div style="clear:both;"></div>
                    </div>
                    <div style="clear:both;"></div>
                </div>
                <div style="clear:both;"></div>
            </div>
            <div style="clear:both;"></div>
        </div>
    </div>
    <!-- 文件上传 -->
	<script type="text/javascript">
		//上传图片
		function upload(n) {
			var of = $("#uploadFile"+n);
			//检查是否选择了图片
			if(of.val()=="") {
				alert("请先选择图片");
				return;
			}
			<#if validateTmember==1>
				alert("请填写必要的信息(手机号码,邮箱地址,身份证号码)");
				location.href="/member/toMemberinfoEdit.jspx";
				return;
			<#elseif validateTmember==2>
				alert("请验证邮箱");
				location.href="/member/v_tmemberToSecurity.jspx";
				return;
			</#if>
			$("#scaptcha").val($("#captcha").val());
			//将file移动至上传表单
			$("#fileContent").empty();
			$("#fileContent").append(of);
			//复制一个file放至原处
			$("#ufc"+n).append(of.clone().attr("value",""));
			//修改属性
			of.attr("id","");
			of.attr("name","uploadFile");
			//其他表单
			$("#ufFileName").val($("#fileName"+n).val());
			$("#ufWidth").val($("#zoomWidth"+n).val());
			$("#ufHeight").val($("#zoomHeight"+n).val());
			//先清除
			$("#ufMark").val("");
			$("#ufMark").val($("#mark"+n).val());
			$("#uploadNum").val(n);
			$("#uploadForm").submit();
		}
		//剪裁图片
		function imgCut(n) {
			if($("#uploadImgPath"+n).val()=="") {
				alert("请先上传图片");
				return;
			}
			var url = "/common/v_image_area_select.do?uploadNum="+n+"&imgSrcPath="
				+$("#uploadImgPath"+n).val()+"&zoomWidth="+$("#zoomWidth"+n).val()+"&zoomHeight="+$("#zoomHeight"+n).val();
			window.open(url,"imgcut","height=120, width=150, top=0, left=0, toolbar=no, menubar=no, scrollbars=auto, resizable=yes,location=no, status=no");
		}
		//预览图片
		function previewImg(n) {
			var img = $("#uploadImgPath"+n).val();
			if(img!="") {
				if(img.indexOf("?")==-1) {
					$("#preImg"+n).attr("src",img+"?d="+new Date()*1);
				} else {
					$("#preImg"+n).attr("src",img+"&d="+new Date()*1);
				}
				/* if(!$("#preImg"+n).attr("noResize")) {
					 $("#preImg"+n).css("width","auto");
					$("#preImg"+n).css("height","auto");
				} */
			} else {
				$("#preImg"+n).removeAttr("src");		
			}
		}
    </script>
	<form id="uploadForm" action="/member/infoUpload.jspx" method="post" enctype="multipart/form-data" style="display:none; width:0px; height:0px;">
		<span id="fileContent"></span>
		<input id="ufWidth" type="hidden" name="zoomWidth"/>
		<input id="ufHeight" type="hidden" name="zoomHeight"/>
		<input id="ufFileName" type="hidden" name="fileName"/>
		<input id="ufMark" type="hidden" name="mark"/>
		<input id="uploadNum" type="hidden" name="uploadNum"/>
		<input id="scaptcha" type="hidden" name="captcha"/>
	</form>
	<iframe name="hiddenIframe" frameborder="0" border="0" style="display:none; width:0px; height:0px;"></iframe>
  	<!-- 文件上传end -->
    <!-- 底部 -->
    <#include "/front/common/footer.html"/>
    
    <!-- 显示已上传资料的大图片div -->
    <div class="bot upload_showBottom"></div>
    <div class="current upload_showImg_div">
        <div class="Pclos"><input type="button" value="关闭" style="width:100px; height:40px;" /></div>
        <img border="0" width="580px;" style="position:absolute;" />
    </div>
</body>
</html>
